package com.hmall.order.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.util.Date;

@Data
@TableName("tb_order")
public class Order {
    @TableId(type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id; //订单编号,自动生成雪花算法ID
    private Long totalFee; //商品金额
    private Integer paymentType; //付款方式：1:微信支付, 2:支付宝支付, 3:扣减余额
    private Long userId; //用户id
    private Integer status; //订单状态：1:未付款 2:已付款-未发货 3:已发货-未确认 4:确认收货-易成功 5:交易取消-订单关闭 6:交易结束
    private Date createTime; //创建订单时间
    private Date payTime; //付款时间
    private Date consignTime; //发货时间
    private Date endTime; //确认收货时间
    private Date closeTime; //交易关闭时间
    private Date commentTime; //评价时间
    private Date updateTime; //更新时间
}